<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:output indent="no" omit-xml-declaration="yes"/>

	<xsl:variable name="primaryModule" select="/engine/@primaryModule" />
	<xsl:variable name="primaryModuleMethod" select="/engine/@primaryModuleMethod" />

	<xsl:variable name="cssURL" select="/engine/@cssURL" />
	<xsl:variable name="jsURL" select="/engine/@jsURL" />
	<xsl:variable name="imagesURL" select="/engine/@imagesURL" />

	<xsl:variable name="currentTheme" select="/engine/@currentTheme" />
	<xsl:variable name="currentLanguage" select="/engine/@currentLanguage" />
	<xsl:variable name="currentUserId" select="/engine/@currentUserId" />

	<xsl:variable name="currentPageTitle" select="//currentPageTitle" />
	<xsl:variable name="currentMetaKeywords" select="//currentMetaKeywords" />
	<xsl:variable name="currentMetaDescription" select="//currentMetaDescription" />

	<xsl:variable name="siteName" select="/engine/@siteName" />

	<xsl:template name="jsScriptsAutoLoad">
		<xsl:if test="//formConstructor//calendarScriptsNeeded">
			<script type="text/javascript" src="{$jsURL}calendar/calendar.js">&#160;</script>
			<script type="text/javascript" src="{$jsURL}calendar/calendar-setup.js">&#160;</script>
			<script type="text/javascript" src="{$jsURL}calendar/lang/calendar-{$currentLanguage}.js">&#160;</script>
			<style type="text/css"> @import url("<xsl:value-of select="$jsURL" />calendar/calendar-system.css");</style>
		</xsl:if>
		
		<xsl:if test="//visualEditorScriptsNeeded">
			<script type="text/javascript" src="{$jsURL}fckeditor/fckeditor.js">&#160;</script>
		</xsl:if>
		
		<script type="text/javascript" src="{$jsURL}mootools.js">&#160;</script>
	</xsl:template>

</xsl:stylesheet>